<html style="height: 700px;">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <meta name="format-detection" content="telephone=no">
    <meta name="robots" content="none">
    <title>测试</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
    <script type="text/javascript" src="/static/js/jquery-1.8.2.min.js"></script>
</head>
<body>
	
<div id="header" class="header"> <header id="sitesearch_header" style="transform: translate3d(0px, 0px, 0px) scale(1) rotate(0deg) rotateY(0deg) skew(0deg, 0deg); backface-visibility: hidden; opacity: 1; transition-property: all; transition-duration: 230ms; transition-timing-function: linear; transform-origin: 0% 0% 0px;">
    <h1>测试</h1>
</header></div>
    

    <div id="content">
        
    <div id="suggest1">
        <div class="w5">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="w5Talbe">
                <tbody><tr>
                    <td width="70">姓名：</td>
                    <td>
                        <input  placeholder="请输入姓名" id="name" name="name" type="text"></td>
                </tr>
                <tr>
                    <td>手机：</td>
                    <td>
                        <input  placeholder="请输入手机" id="mobile" type="text"></td>
                </tr>
                <tr>
                    <td>微信号：</td>
                    <td>
                        <input placeholder="请输入微信号" id="wxid" type="text"></td>
                </tr>
            </tbody></table>
                <input onclick="submitSug()" type="button" value="提交"></input>
            <br>
            <br>
        </div>
    </div>

</div>



<script type="text/javascript">
    $(document).ready(function () {
        $.ajax({
            url: 'http://127.0.0.1:8000/webserver/api/v1/user/?format=json&openid=XXXXXXXXXXXXXXXXXX',
            type: 'GET',
            dataType: 'json',
            success: function (data) {
            	alert(data);
                alert(data["objects"][0]["address"]);
            }
        });
    });
    
    function submitSug(){
    	$.ajax({ 
                type: 'post', 
                url: '/weixin/getopenid/', 
                data : '{"code":"001omI0h2YcbsN0EIA1h2DrJ0h2omI0"}',
                dataType: 'json', 
                contentType : 'application/json',
                success: function (data) { 
                        alert(data["openid"]);
                }, 
                error: function (XMLHttpRequest, textStatus, errorThrown) { 
                        alert(errorThrown); 
                } 
        });
}

</script>

